package com.hhkj.study.admin.teacher.service.base.impl;

import com.github.pagehelper.PageInfo;
import com.hhkj.study.admin.teacher.entity.Teacher;
import com.hhkj.study.admin.teacher.mapper.TeacherMapper;
import com.hhkj.study.admin.teacher.model.podo.TeacherDo;
import com.hhkj.study.admin.teacher.model.podo.TeacherPo;
import com.hhkj.study.admin.teacher.service.base.TeacherService;
import com.ruoyi.common.base.biz.service.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@Service
public class TeacherServiceImpl extends BaseServiceImpl<Teacher, TeacherDo, TeacherPo, TeacherMapper> implements TeacherService {

    @Override
    public PageInfo<TeacherPo> pagingPoByDo(TeacherDo conditionDo) {
        conditionDo.getPageDomain().setOrderByColumn("orderNum");
        conditionDo.getPageDomain().setIsAsc("desc");
        return super.pagingPoByDo(conditionDo);
    }

    @Override
    public Map<String, String> getOrderColumnMap() {
        return new HashMap<String, String>() {{
            put("orderNum", "xt.order_num");
            put("id", "xt.id");
        }};
    }
}